<template>
	<view v-if="show">
		<view v-for="(value,key) in StudentStatusInfo" :key="key" @click="gotoInfo(key)">
			<statusItem  :ColorType="ColorType" :StudentFindPass="value"></statusItem>
		</view>
	</view>
</template>

<script>
	
	import statusItem from './statusItemChild/statusItem.vue'

	import {
		getStudentStatusInfoByStatusAndTid
	} from '@/api/status/service.js';


	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			},
			xmId: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				ColorType: 2,
				StudentStatusInfo: [],
				tId:0
			}
		},
		components: {
			statusItem,
		},
		created() {
			console.log("created");
			this.tId = uni.getStorageSync("Teaid")
			this.loadData();
		},
		methods: {
			loadData() {
				console.log("aaaa",this.tId);
				getStudentStatusInfoByStatusAndTid(this.tId, 2)
					.then(res => {
						this.StudentStatusInfo = res.data.list
						console.log(this.StudentStatusInfo)
						console.log(res)
					}).catch(res => {
						console.log(res)
					})
			}
		}
	}
</script>

<style>

</style>
